package com.company.class4;

/**
 * @Classname Human
 * @Description 类型说明
 * @Date 2022/4/16 18:38
 * @Created by zbw
 */

public class Human {

    public static String name;
    public int age;
    public String sex;
    public final String DEPENDENT_WATER = "依赖水源";
    public String colour;

    public Human(String name, int age){
        Human.name = name;
        this.age = age;
    }

    public static void eat_Food(){
        System.out.println(Human.name+"是需要吃饭");
    }

    public void love(){
        if(this.age >= 18) {
            System.out.println(Human.name + "是需要谈恋爱的");
        }else{
            System.out.println(Human.name + "还小，需要好好读书");
        }
    }

    public static String getName() {
        return name;
    }

    public static void setName(String name) {
        Human.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getColour() {
        return colour;
    }

    public void setColour(String colour) {
        this.colour = colour;
    }
}
